package com.electron.server.service.impl;

import com.electron.server.dao.QiZhongJiRealTimeDao;
import com.electron.server.dto.QiZhongJiRealTimeDTO;
import com.electron.server.entity.QZJRealTime;
import com.electron.server.service.QZJRealTimeService;
import com.google.gson.Gson;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class QZJRealTimeServiceImpl implements QZJRealTimeService {
    @Autowired
    QiZhongJiRealTimeDao qiZhongJiRealTimeDao;

    @Override
    public void addQzj(QiZhongJiRealTimeDTO qzjRealTime) {
        Gson gson = new Gson();
        String str = gson.toJson(qzjRealTime);
        qiZhongJiRealTimeDao.save(gson.fromJson(str,QZJRealTime.class));
    }
}
